﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using InfraWEB.DAL;
using InfraWEB.DAL.RelatoriosTableAdapters;

namespace InfraWEB.BLL
{
    public class Relatorio
    {
        private ItemInspecaoTableAdapter _itemInspAdapter = null;
        private ItemEstoqueTableAdapter _itemEstAdapter = null;
        private ConsumoTableAdapter _consumoAdapter = null;

        protected ItemInspecaoTableAdapter ItemInspecaoAdapter
        {
            get
            {
                if (_itemInspAdapter == null)
                {
                    _itemInspAdapter = new ItemInspecaoTableAdapter();
                }
                return _itemInspAdapter;
            }
        }

        protected ItemEstoqueTableAdapter ItemEstoqueAdapter
        {
            get
            {
                if (_itemEstAdapter == null)
                {
                    _itemEstAdapter = new ItemEstoqueTableAdapter();
                }
                return _itemEstAdapter;
            }
        }

        protected ConsumoTableAdapter ConsumoTableAdapter
        {
            get
            {
                if (_consumoAdapter == null)
                {
                    _consumoAdapter = new ConsumoTableAdapter();
                }
                return _consumoAdapter;
            }
        }



        public Relatorios.ItemInspecaoDataTable GetAllItens()
        {
            return ItemInspecaoAdapter.GetAllItems();
        }

        public Relatorios.ItemEstoqueDataTable GetAllEstoqueAlimenticio()
        {
            return ItemEstoqueAdapter.GetAllEstoqueAlimenticio();
        }

        public Relatorios.ItemEstoqueDataTable GetAllEstoqueLimpeza()
        {
            return ItemEstoqueAdapter.GetAllEstoqueLimpeza();
        }

        public Relatorios.ItemEstoqueDataTable GetAllEstoqueMaterialEscritorio()
        {
            return ItemEstoqueAdapter.GetAllEstoqueMaterialEscritorio();
        }

        public Relatorios.ConsumoDataTable GetAllConsumo()
        {
            return ConsumoTableAdapter.GetAllConsumo();
        }
    }
}
